package com.protocol;

import io.netty.handler.codec.LengthFieldBasedFrameDecoder;

/**
 * @author linyu.dai
 * @project rpc
 * @description 协议内容长度控制 解决粘包和半包
 * @creat 2022/11/27 15:01:01
 */
public class ProtocolFrameDecoder extends LengthFieldBasedFrameDecoder {

    //格式化消息
    public ProtocolFrameDecoder(){
        this(1024*1024, 12, 4,0,0);
    }

    public ProtocolFrameDecoder(int maxFrameLength, int lengthFieldOffset, int lengthFieldLength, int lengthAdjustment, int initialBytesToStrip) {
        super(maxFrameLength, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip);
    }

}
